package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.mini.minitrade.MiniTradeQuery;
import com.uzai.console.entity.MiniTrade;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface MiniTradeMapper {
    int deleteById(@Param("id") Long id);

    int insert(MiniTrade record);

    int insertSelective(MiniTrade record);

    MiniTrade selectById(@Param("id") Long id);

    MiniTrade selectByOutsideCode(@Param("outsideCode") String outsideCode);

    int updateByIdSelective(MiniTrade record);

    int updateById(MiniTrade record);

    int updateStatus(MiniTrade record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<MiniTrade> findByList(Page<MiniTrade> page, @Param("query") MiniTradeQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<MiniTrade> findByList(@Param("query") MiniTradeQuery query);
}